package com.framework.common.util.dataSource;

/**
 * @author 龘鵺
 * @version 1.0
 * @className com.framework.common.util.dataSource
 * @description 数据库连接ENC密钥工具类
 * @datetime 2025-05-07 14:10:36
 */
public class DataSourceEncUtil {

    /**
     * 禁止创建主库,避免禁用或误删操作造成数据库连接不上
     */
    public final static String MASTER = "master";

    /**
     * rsa 非对称 512-2048 加密 私钥
     * 注意：上生产的时候禁止把私钥写在此处，避免被反编译破解登录帐号密码信息
     */
    public static final String privateKey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJoaBce8toecVgwL2kpE97bg/o/Zz+GNQGoG0e/YKOWl7urGlRSCTeKT9qdACBB04XC9stgNOY5HN9aPNnbYaAUCAwEAAQ==";
    /**
     * rsa 非对称 512-2048 加密 公钥
     */
    public static final String publicKey = "MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAmhoFx7y2h5xWDAvaSkT3tuD+j9nP4Y1AagbR79go5aXu6saVFIJN4pP2p0AIEHThcL2y2A05jkc31o82dthoBQIDAQABAkBtcvwV//eYW7ZVuflhdJiH4EeNPgNCzIMqiwuCkQGDEPs/Py3ZXDNnavVorvmHgRPQVwKCfA4QHC5Qm7mENzYlAiEA2hR7LvUHmfzN85pnM6MW9njYtNGpaMWz366A3qRKjG8CIQC05aL9DS5fPxgR9Od4GWGeErZrsEgavn+hdCVSE1O0ywIgNZc84kAymwPF9Kwn2kekt/LghibTs7yJxFkUsCG9dB8CIBx6Lg9iHNO3rgVdpXa9oCVvUrJfPOqg5Jy5GQrzqfDDAiBic6Y96O3zsMPSzIOm/GH0RHvA73fzCZii6F3e5W9ztA==";

    /**
     * @param val 1 字符串
     * @return java.lang.String
     * @title 组装解密字符串
     * @description 组装解密字符串
     * @author 龘鵺
     * @datetime 2025-05-07 14:30:26
     */
    public static String getEnc(String val) {
        StringBuilder sb = new StringBuilder("enc(");
        sb.append(val);
        sb.append(")");
        return sb.toString();
    }
}
